home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / PASCAL / 0635.ZIP / WNDODEMO.PAS < prev   
Pascal/Delphi Source File  |  1987-09-26  |  1KB  |  66 lines

  1. Program WindowDemo(Input,Output);
  2. {  4/4/87 : This program demonstrates the use of the MiniGen windowing
  3.             routines.
  4. }
  5. Const
  6.   ScreenCount = 4;        { Enter the number of screens you wish to define }
  7.  
  8. {$I MGPROG.INC}          { Combined windowing and data entry routines }
  9. {$I CURSOR.INC}           { Cursor(8/15,0);    erases it  (CGA/MA)  }
  10.                           { Cursor(6/13,7/10); returns it           }
  11.  
  12.                           { Enter any ScrnGen window procedres here }
  13.  
  14. Var
  15.   Int : Integer;
  16.  
  17. Procedure Pause;
  18. Var
  19.   Ch : Char;
  20. Begin
  21. Repeat
  22.   Read(kbd,Ch);
  23. Until not KeyPressed;
  24. End; {Pause}
  25.  
  26. Procedure MainLoop;       { Main program logic }
  27. Begin
  28. Window(1,1,80,25);
  29. TextBackground(Blue);
  30. ClrScr;
  31. For Int := 1 to 1999 do
  32.   Write('X');
  33. OpenWindow(1);
  34. Write('Window one. ');
  35. Pause;
  36. OpenWindow(2);
  37. Write('Window two. ');
  38. Pause;
  39. OpenWindow(3);
  40. Write('Window three. ');
  41. Pause;
  42. OpenWindow(4);
  43. Write('Window four. ');
  44. Pause;
  45. CloseWindow;
  46. Pause;
  47. CloseWindow;
  48. Pause;
  49. CloseWindow;
  50. Pause;
  51. CloseWindow;
  52. End;
  53.  
  54. Begin
  55. ClrScr;
  56. MaxLimits;
  57. InitializeScreens;
  58. DefineScreen(1,10, 5,70,22,4,1,$4E);
  59. DefineScreen(2, 1, 1,40,12,1,2,$70);
  60. DefineScreen(3,20,15,55,19,2,3,$50);
  61. DefineScreen(4,50, 9,80,25,3,4,$1D);
  62. MainLoop;
  63. TerminateScreens;
  64. TextBackground(Black);
  65. ClrScr;
  66. End.